<?php
//define('IS_64b',TRUE);
$settings['listen'] = '81.177.150.82';									// DNS-server Host
$settings['listen_port'] = 53;													// DNS-server port
$settings['pidfile'] = COREBIND_ROOT.'cutebind.pid';		// Default pid-file
$settings['use_fork'] = TRUE;														// Enables multi-threading if possible.
$settings['table'] = array(															// Simple inline resolving hash-table.
   'quicktorrent.ru.' =>
      array(
					'A' => '195.91.176.40',
					'MX' => '20=195.91.176.40',
					'NS' => 'ns1.quicktorrent.ru.',
					'SOA' => array(
							'PRIMARY_NS' => 'ns1.quicktorrent.ru.',
							'ADMIN_MB' => 'admin.quicktorrent.ru',
							'SERIAL_NUMBER' => 2008100200,
							'REFRESH_INTERVAL' => 3600,
							'RETRY_INTERVAL' => 3600,
							'EXPIRATION' => 3600,
							'MIN_TTL' => 100,
					),
     ),
		'psp-base.com.' => array(
					'A' => '81.31.39.230',
					'NS' => 'ns1.verusterra.com.',
					'SOA' => array(
							'PRIMARY_NS' => 'ns1.verusterra.com.',
							'ADMIN_MB' => 'admin@verusterra.com',
							'SERIAL_NUMBER' => 2008100200,
							'REFRESH_INTERVAL' => 3600,
							'RETRY_INTERVAL' => 3600,
							'EXPIRATION' => 3600,
							'MIN_TTL' => 100,
					),
	 ),	
   '195.91.176.40' => array('PTR' => 'we.are.quicktorrent.ru.'),
   'example.tld.' => array('A' => 'RR(1.2.3.4,1.2.3.5,1.2.3.6)'),
);
$settings['TTL'] = 58;																	// Time-To-Life (TTL)
$settings['worker'] = FALSE;
$settings['cutebind_path'] = 'cutebind';								// Path to CuteBind's executable file.
$settings['logging'] = 1;																// Logging level
$settings['setuser'] = '';															// You can set user of master process (sudo).
$settings['setgroup'] = '';															// You can set group of master process (sudo).
$settings['DNS'] = array(
  'TC'=> '0', // Truncate to 512 bytes
  'RA'=> '1', // Recursive queries enabled? (1/0)
);
//$settings['dbaddr'] = 'mysql://root:@localhost/cuteresolve';
function resolver(&$cq,$init = FALSE)
{
 global $settings;
 static $db = NULL;
 if ($db === NULL && (!empty($settings['dbaddr'])))
 {
  $p = parse_url($settings['dbaddr']);
  $db = mysql_connect($p['host'].':'.$port,$p['user'],$p['pass']);
  mysql_select_db(trim($p['path'],'/'),$db);
 }
 if ($init) {return;}
 if ($cq['QTYPE'] != 'A') {return FALSE;}
 if ($cq['domain'] == 'script.example.tld.') {$cq['IP'] = '12.34.56.78'; return TRUE;}
 return FALSE;
}